package com.i2863.watchdog.inspect;

import com.i2863.watchdog.util.ResponseInfo;

/**
 * 包含关键字
 * @author xuweiwei
 * @date 2017/12/6
 */
public class ContainsInspector implements Inspector {
    private String keyword;

    @Override
    public boolean pass(ResponseInfo responseInfo) {
        return  responseInfo.getContent() != null && responseInfo.getContent().contains(keyword);
    }

    public String getKeyword() {
        return keyword;
    }

    public void setKeyword(String keyword) {
        this.keyword = keyword;
    }
}
